<!DOCTYPE html>
<html lang="en" xmlns:th="https://www.thymeleaf.org/">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
  <table id="star_rail_table" border="1">
    <tr th:each="i:${list}">
        <td th:text="${i.str}" th:if="${i.star} == 5" style="color: gold"></td>
        <td th:text="${i.str}" th:if="${i.star} == 4" style="color: deeppink"></td>
        <td th:text="${i.str}" th:if="${i.star} == 3" style="color: cornflowerblue"></td>
    </tr>
<!--    <tr>-->
<!--      <td th:each="i:${list}" th:text="${i}"></td>-->
<!--    </tr>-->
  </table>
</body>
</html>